# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>

pkgname=gitoxide
pkgver=0.31.1
pkgrel=1
pkgdesc="An idiomatic, lean, fast & safe pure Rust implementation of Git"
url='https://github.com/Byron/gitoxide'
arch=('loong64' 'x86_64')
license=('MIT' 'Apache-2.0')
makedepends=('cargo' 'cmake')
options=(!lto)
source=(https://github.com/Byron/${pkgname}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('639c366d3767f5391e055a985de0ac9142fd56f76a1920bacd920b25dabc3b64')
b2sums=('ffbd082134a1f667523bb8d150ed67853e10f3282b7d4ff78b5562e819be21f411ac03a25b53cb85d22d978ffaf2001bf6c73812f113ab9d7541ac75fc2182c6')

prepare() {
  cd "${pkgname}-${pkgver}"
  cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
  cd ${pkgname}-${pkgver}
  cargo build --frozen --release --no-default-features --features max-pure
}

package() {
  cd ${pkgname}-${pkgver}
  install -Dm 755 -t "${pkgdir}/usr/bin" \
    target/release/gix \
    target/release/ein
}

# vim: ts=2 sw=2 et:
